package yslog

import (
	"github.com/gogf/gf/v2/os/glog"
)

func NewLoggerCoreWithPrefix(prefix string, name ...string) LoggerCore {
	l := NewLoggerCore(prefix)
	return l
}

func NewLoggerCore(name ...string) LoggerCore {
	l := Log(name...)
	return LoggerCore{
		logger: l,
	}
}

type LoggerCore struct {
	logger *glog.Logger
}

func (l LoggerCore) Log() *glog.Logger {
	return l.logger
}

func (l LoggerCore) Clone() *glog.Logger {
	return l.logger.Clone()
}

type ILogger interface {
	Log() *glog.Logger
}
